home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #3 / Amiga Plus CD - 2002 - No. 03.iso / AmigaPlus / AmigaOS / Aplus_Dev / AP-Website / links / in.php < prev    next >
Encoding:
PHP Script  |  2002-10-28  |  738 b   |  35 lines

  1. <?
  2. // *******************************************************************
  3. //  in.php
  4. // *******************************************************************
  5. include("./include/config.php");
  6. include("./include/functions.php");
  7. include("./include/session.php");
  8. session_start();
  9. if(isset($ID)){
  10.     $get_site = sql_query("
  11.         select
  12.             *
  13.         from
  14.             $tb_links
  15.         where
  16.             ID='$ID'
  17.     ");
  18.     
  19.     $get_row = sql_fetch_array($get_site);
  20. }
  21. if($REMOTE_ADDR != $get_row[InIP]){
  22.     $result = sql_query("
  23.         update
  24.             $tb_links
  25.         set
  26.             HitsIn = HitsIn + 1,
  27.             InIP = '$REMOTE_ADDR',
  28.             LastUpdate = LastUpdate
  29.         where
  30.             ID='$ID'
  31.     ");
  32. }
  33. $index = "./index.php?" . session_name() . "=" . session_id();
  34. header("Location: $index");
  35. ?>